UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FsrsFmdWGWPTqYZ5Ycmf+fEt+RvfMPFvZEaMH61FW2E='
WHERE
key_id = 'c771a7de76790ec3a61494c35adf2fdd451a3c4cdf639e685cdd2daab09671cb'
AND (
token = 'FsrsFmdWGWPTqYZ5Ycmf+fEt+RvfMPFvZEaMH61FW2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)