UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dMLBLKpbGjEuB2Otw2Ji+IX3UHHO0JxQoQQHIxm+FqE='
WHERE
key_id = 'ca40d0fd6b48fcf6fc2bcceab921c62a4692693409ad9176cd6883c6516746a4'
AND (
token = 'dMLBLKpbGjEuB2Otw2Ji+IX3UHHO0JxQoQQHIxm+FqE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)