UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4Jve3EFebgEhTAxxcZ1Q+a5LGObMeMR3foS8QmIOqNE='
WHERE
key_id = '75718b8ee55ded4e03433d2ba6c2413d43b8e28e8de1f62a096fedfb3de6f9f8'
AND (
token = '4Jve3EFebgEhTAxxcZ1Q+a5LGObMeMR3foS8QmIOqNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)