UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o0ufH4Ims3LzEhlsqzJhtgg9vtYWcsb4FcvQg/068B4='
WHERE
key_id = '4e0ff69aa440e3328368cd07faeda76e0e1bd0fdd7b84aad8b8abf6c3c0adecf'
AND (
token = 'o0ufH4Ims3LzEhlsqzJhtgg9vtYWcsb4FcvQg/068B4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)