UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'c0fgcfUZ3YiR1fGl5EOLlyMKi/onKkL4LUhKEUWKhJI=' 
WHERE 
  key_id = '925136d39c0e124fd186fceecfa3fc5af151f46fa950ec587e670f57113a2416' 
  AND (
    token = 'c0fgcfUZ3YiR1fGl5EOLlyMKi/onKkL4LUhKEUWKhJI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017