UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FGEIexJW56++j0OocwhCQKe+66aVUUNLGC+NBLLpCsU='
WHERE
key_id = '82106f3cf41e1af2c9a7ae6d06dd3838a6762edf269cddbe88cec22c62386eb0'
AND (
token = 'FGEIexJW56++j0OocwhCQKe+66aVUUNLGC+NBLLpCsU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)