UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VIBBEIAtQfGODs6afPx2T1NgGKsZmC6ahCnMqrz9hXk='
WHERE
key_id = '2b1e0503a0a4b6777ba7313c40b3fc8e025e00c88ba0558f5c87101c5d91b45a'
AND (
token = 'VIBBEIAtQfGODs6afPx2T1NgGKsZmC6ahCnMqrz9hXk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)