UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zzXZj/uaLl7OJSJD4b97lhvAK5krd9rdG7Lr57FyCj0=' 
WHERE 
  key_id = '3b4fe8e1f96ae424e91943f314227e83a05cfb7a27bb96dfb4d937228c43aebd' 
  AND (
    token = 'zzXZj/uaLl7OJSJD4b97lhvAK5krd9rdG7Lr57FyCj0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033