UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lLWnaR2vxerqp3tBu5jp2PDilMXKQCiKYJFOGySlwqc='
WHERE
key_id = '37b816f20106a26c65e3d1d4186ac70d0cc04eaca3eed771ffbf241b96480da1'
AND (
token = 'lLWnaR2vxerqp3tBu5jp2PDilMXKQCiKYJFOGySlwqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)