UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+jjcAFNtaekFGtrClQAH7B3aRlvDnQ3W6PXp3gGfL6c=' 
WHERE 
  key_id = 'a0ef3be2ad592ecac15fda08e1b50c2e935f4700f3ba92f9621ed45f4a93fbe0' 
  AND (
    token = '+jjcAFNtaekFGtrClQAH7B3aRlvDnQ3W6PXp3gGfL6c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00056