UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L/G+3c3E0PiuBXNWxYGqWOv+pUzP191IBsyN0zHzhb8='
WHERE
key_id = '3eb4053237d9f9abbb7eaeb68a10cebf0713d5dc313a3ef81bbd1173b787cb51'
AND (
token = 'L/G+3c3E0PiuBXNWxYGqWOv+pUzP191IBsyN0zHzhb8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)