UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lxqpovc7IIxjobEX7aL0aczgeENUb3LETKt/VCwbXHM='
WHERE
key_id = '632f3d146bc14669e4f5772950addee165a40a8e10dc38fbf8c96be5ddaac1aa'
AND (
token = 'Lxqpovc7IIxjobEX7aL0aczgeENUb3LETKt/VCwbXHM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)