UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UitNFMn/UyK0s3s6NQ/k0e3dIqpLfm0fN5aniQr6epo='
WHERE
key_id = '921a25736fe2f9c0644a4d822b123cfae018b61622cc9a8c66cc3f78f947f4a3'
AND (
token = 'UitNFMn/UyK0s3s6NQ/k0e3dIqpLfm0fN5aniQr6epo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)