UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qlbVfO2GxzVKPyyc5JvZeozLzr4opA7k/5PN3ucNydY='
WHERE
key_id = 'fa92ae68d1b9aa08fd136de9e9d67f26028ac07e2d79a2257f0377ce5d9da091'
AND (
token = 'qlbVfO2GxzVKPyyc5JvZeozLzr4opA7k/5PN3ucNydY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)