UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qnq8FNflAQvYxEJHaUiRvSVHGip4/4ebLKse2y/RI9g=' 
WHERE 
  key_id = 'f70d57f541c73af7d180ac3f94a7db9c48bd31498b78e4b7a4dc506f85ca8534' 
  AND (
    token = 'qnq8FNflAQvYxEJHaUiRvSVHGip4/4ebLKse2y/RI9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019