UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8xksh+5jIysLOAOi0Jq88wKqs7fZK+gpoX6Y45lA1b4=' 
WHERE 
  key_id = '273f651712c9e881f83e55c082582003df787f5f7c0fb38276f9ea05def4325b' 
  AND (
    token = '8xksh+5jIysLOAOi0Jq88wKqs7fZK+gpoX6Y45lA1b4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017