UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Jq05amCpAm6NjHCqbQ63WXHKJ0lRtLQ6i4YIowVtVeI=' 
WHERE 
  key_id = '110b5d4e93bb347ab5283e3eaa87e8fcfc1644afc035b505f37b9634bedf3b18' 
  AND (
    token = 'Jq05amCpAm6NjHCqbQ63WXHKJ0lRtLQ6i4YIowVtVeI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060