UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1HsiYE0Aml3tGN/4N0GOhuWM7VXml1MLH3769tNn2gg=' 
WHERE 
  key_id = 'af7c924c844b4c6fd6bae10d1262c9ddd666a5839a94f0960e5ac693413bbdff' 
  AND (
    token = '1HsiYE0Aml3tGN/4N0GOhuWM7VXml1MLH3769tNn2gg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028