UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xti2i4uCofR3R+yZRGvwVq9vj9QbszVmlYNqofCtooE='
WHERE
key_id = 'c53f5d480a3df8cf8027c0e5644faa3ea1a028d3690df28579bb855fc0b136d5'
AND (
token = 'xti2i4uCofR3R+yZRGvwVq9vj9QbszVmlYNqofCtooE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)