UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JJEhlr+YTz8Q8K0j3KnCtk0nGN3VVJwwTt21A/geyhk=' 
WHERE 
  key_id = 'c8adfed59dde7ed2a3964909f7193c5567ba8241474da32253a94db508b86700' 
  AND (
    token = 'JJEhlr+YTz8Q8K0j3KnCtk0nGN3VVJwwTt21A/geyhk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019