UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'R2QcIHHrpUFSrtbEPCu6Xj7XiZNMfF7hh/bvMW/JkaU='
WHERE
key_id = '16fd2c9d0cb2a3b7d368e6c8e843c2a0371cc56396b48c33ee78f80bd841d43b'
AND (
token = 'R2QcIHHrpUFSrtbEPCu6Xj7XiZNMfF7hh/bvMW/JkaU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)