UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uh2zRbGOQsQv9cExLTWTBLRgrlS8M9zCb7rrgYpaaek='
WHERE
key_id = '715924ddcc169a33ce898766c1fab837066c6cef850a7b2b3f07914d17357197'
AND (
token = 'uh2zRbGOQsQv9cExLTWTBLRgrlS8M9zCb7rrgYpaaek='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)