UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yfa/KSydwzoYwjadHgUEckO6wCLJZnY1ffDgRzChH9Y='
WHERE
key_id = '9209e16798a9247eff170c173dbf0d64de7f42a5a874b3dc84dec49f9274e9ee'
AND (
token = 'Yfa/KSydwzoYwjadHgUEckO6wCLJZnY1ffDgRzChH9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)