UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AAaGnZpX7Gk8/HCq+GYzE3yGug6ThW18WixOM2Tol08='
WHERE
key_id = 'fef911b5d1be93c9047be23c68679afcec8bed4b5e3e5a6265de9f8ba56684db'
AND (
token = 'AAaGnZpX7Gk8/HCq+GYzE3yGug6ThW18WixOM2Tol08='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)