UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LHOS/qU9BkmwAgGHOTcOHkJF17reiPQIgnKABodFu4o='
WHERE
key_id = '545a6f6080187afa03c0a9f09c1380c812139d5c283e42160f532984b246b68b'
AND (
token = 'LHOS/qU9BkmwAgGHOTcOHkJF17reiPQIgnKABodFu4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)