UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zU4ciSmWcGHRB2/XEHd0ckV+RktlfDN5aQpyR8qYMGU='
WHERE
key_id = 'a55d70d5ed09209243e8ca098427f41d2a652c9bdab07b3cc591d1c2d02379e5'
AND (
token = 'zU4ciSmWcGHRB2/XEHd0ckV+RktlfDN5aQpyR8qYMGU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)