UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qhjnQv1ihY4Jo1OClO5OR1WUpfB9UXwf62pMvsBEgoE=' 
WHERE 
  key_id = '6cffc14d9dd0ac38c631c042385d8068f2bd857cfbd3cf4aa1698dc6951335a7' 
  AND (
    token = 'qhjnQv1ihY4Jo1OClO5OR1WUpfB9UXwf62pMvsBEgoE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019