UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '70ed8UXjDxO1oM6/6UGC0bFpHkXTZjCT/d86xNkGNS0=' 
WHERE 
  key_id = '15c65e74cbb8eecbae002d5c5fdd6d054b3cef23324a71351022ab1bd064ad81' 
  AND (
    token = '70ed8UXjDxO1oM6/6UGC0bFpHkXTZjCT/d86xNkGNS0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016